package com.fc.test.model.custom;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;


/**
 * describe: 用户实体
 *
 * @author xugang
 * @date 2018/9/19 12:49
 */
public class TUser implements Serializable {

    private static final long serialVersionUID = 1L;

    // 用户自增ID
    private int id;

    // 用户姓名
    private String username;

    // 手机号码
    private String mobilePhone;

    // 登录密码
    private String password;

    // 电子邮箱
    private String email;

    // 性别(0女;1男)
    private int gender;

    // 年龄
    private int age;

    // 注册时间
    private Date registerTime;

    // 注册时间(文本格式)
    private String showRegisterTime;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getMobilePhone() {
        return mobilePhone;
    }

    public void setMobilePhone(String mobilePhone) {
        this.mobilePhone = mobilePhone;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public int getGender() {
        return gender;
    }

    public void setGender(int gender) {
        this.gender = gender;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Date getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(Date registerTime) {
        this.registerTime = registerTime;
        try {
            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            String strTime = dateFormat.format(registerTime);
            setShowRegisterTime(strTime);
        } catch (Exception e) {

        }
    }

    public String getShowRegisterTime() {
        return showRegisterTime;
    }

    public void setShowRegisterTime(String showRegisterTime) {
        this.showRegisterTime = showRegisterTime;
    }
}